#include "Josephus.h"
#include <assert.h>
#include <iostream>

using namespace std;

Josephus* init(int count)
{
	assert(count > 0);
	Josephus* head = new Josephus(1);
	Josephus* iterator = head;

	int cnt = 1;
	while(cnt++ < count)
	{
		iterator->next = new Josephus(cnt);
		iterator = iterator->next;
	}
	return head;
}

Josephus* traverse(int m)
{

}

int main()
{

	int count = 0, interval = 0;;
	cin >> count >> interval;
	Josephus* head = init(count);

	return 0;
}